from tools.Result import success_result
from tools.HtmlPageService import get_selector_text

from playwright.sync_api import Page
def get_html_detail(page: Page,detail_url:str):
    page.goto(detail_url, wait_until="domcontentloaded",
              timeout=5000)
    status_name= get_selector_text(page,".status.fl")
    start_price= get_selector_text(page,".project-info .name")
    current_price= get_selector_text(page,".price .current-price")
    return success_result("获取成功",{"status_name":status_name,"start_price":start_price,"current_price":current_price})
